package mysql

import (
	"fmt"
	"github.com/jmoiron/sqlx"
)

func selectMysql(db *sqlx.DB) (person []Person,err error) {

	err = db.Select(&person, "select user_id, username, sex, email from person where user_id=?", 2)
	if err != nil {
		fmt.Println("exec failed, ", err)
		return
	}

	fmt.Println("select succ:", person)

	return
}
